package com.nf.action;

import com.nf.service.TestService;
import com.nf.service.TestServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.text.SimpleDateFormat;
import java.util.Date;

@Controller
public class TestAction {

    @Autowired
    private TestService t1;

    @RequestMapping("/abc")
    public String t1(Model model) {
        model.addAttribute("myDateStr", t1.getDate());
        return "a1";
    }

    @RequestMapping("/abcd")
    public String t2(Model model) {
        model.addAttribute("myDateStr", t1.getDate());
        return "a1";
    }
}
